@if ($paginator->hasPages())
    <div class="pagelist">
        <span class="total_page" title="总页数"><b>{{ $paginator->lastPage() }}</b></span>
        @if ($paginator->onFirstPage())
            <b>上一页</b>
        @else
            <a href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">上一页</a>
        @endif
        {{-- Pagination Elements --}}
        @foreach ($elements as $element)
            {{-- "Three Dots" Separator --}}
            @if (is_string($element))
                <span class="total_page" aria-disabled="true"><span>{{ $element }}</span></span>
            @endif

            {{-- Array Of Links --}}
            @if (is_array($element))
                @foreach ($element as $page => $url)
                    @if ($page == $paginator->currentPage())
                        <b>{{ $page }}</b>
                    @else
                        <a href="{{ $url }}">{{ $page }}</a>
                    @endif
                @endforeach
            @endif
        @endforeach
        @if ($paginator->hasMorePages())
            <a href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">下一页</a>
        @else
            <b aria-hidden="true">下一页</b>
        @endif
        <a href="{{ route('articles.index').'?page='.$paginator->lastPage() }}" rel="next"
           aria-label="@lang('pagination.next')">尾页</a>
    </div>
@endif
